(ns mdc.common.test-expect.test-is-adapter.tests
 (:use mdc.common.test-expect.test-is-adapter
   [mdc.common.test-expect.test-utils :only (assert-called)]
   clojure.contrib.test-is))

(deftest test-report-problem-called
  (def #^{:private true} fn1 (fn [x] "dummy code"))
  (def #^{:private true} fn2 (fn [x y] "dummy code2"))
  (let [under-test (fn [x] (fn1 x))]
    (assert-called mdc.common.test-expect.test-is-adapter/report-problem
      true (expect [fn1 (times 5)] (under-test "hi")))))

(deftest test-is-report-called
  (assert-called clojure.contrib.test-is/report true
    (mdc.common.test-expect.test-is-adapter/report-problem
      'fn-name 5 6 "fake problem")))


